<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>运策网 - 用户注册</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/main.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/theme/css/style_reg.css" />
	<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery.validate.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/additional-methods.js" charset="utf-8"></script>
	<script type="text/javascript">
	  $(document).ready(function(){
	  	$("#regUserForm").validate({
	  	rules : {
	  		"user.username" : {
	  			required : true,
	  			username : true,
	  			remote : {
	  				url : "${pageContext.request.contextPath}/user/checkUser.action",
	  				type : "post"
				}
	  		},
	  		"user.password" : {
	  			required : true,
	  			maxlength : 20,
	  			minlength : 6
	  		},
	  		"verifyPassword" : {
	  			required : true,
	  			equalTo : "#password"
	  		},
	  		"user.email" : {
	  			email : true,
	  			maxlength : 100
	  		},
	  		"verifyCode" : {
	  			required : true
	  		}
	  	},
	  	messages : {
	  		"user.username" : {
	  			required : "请输入用户名",
	  			username : "用户名应该是6-16位数字、字符和\"_\"组成",
	  			remote : "该用户名不可用，请更换用户名"
	  		},
	  		"user.password" : {
	  			required : "请输入密码",
	  			maxlength : "密码应该在6到20位之间",
	  			minlength : "密码应该在6到20位之间"
	  		},
	  		"verifyPassword" : {
	  			required : "请再次输入密码",
	  			equalTo : "两次输入的密码不一致"
	  		},
	  		"user.email" : {
	  			email : "请输入正确的电子邮箱",
	  			maxlength : "电子邮箱不能多于100个字符"
	  		},
	  		"verifyCode" : {
	  			required : "请输入验证码"
	  		}
	  	}
	  	});
	  });
  </script>
   </head>
	<body>
		<div class="main_wrap clearfix">
			<a title="运策网 " href="${pageContext.request.contextPath}">
				<div class="reg_logo">
				</div>
			</a>
			<div class="guide-reg clearfix">
				<div class="main_left" style="width: 895px;">
					<div class="form_wrap clearfix">
						<span class="login">已有运策网帐号，<a href="${pageContext.request.contextPath}/user/preLogin.action" target="_blank">登录</a>
						</span>
						<div class="user_wrap clearfix">
							免费注册运策网帐号
						</div>
						<div class="tipMsg">
							<div class="success"></div>
							<h2>恭喜！注册成功！</h2>
							<div class="content" style="padding-left: 93px;">您在运策网的登陆账号为 <s:property value="loginUser.username"/>, 请妥善保管您的账号资料。现在您可以：
							  <ul>
							  	  <li>
							  	  	<a href="<s:url action="preEditUserInfo.action" namespace="/userAdmin"></s:url>">完善个人信息>></a> 
							  	  </li>
							  	  <sec:authorize access="hasRole('ROLE_USER')">
								  <li>
								  	<a href="<s:url action="preAddCargo.action" namespace="/cargo"></s:url>">发布货源信息>></a>
								  </li>
								  </sec:authorize>
							  </ul>
							</div>
						</div>
					</div>
				</div>
				<div class="b_text">
					<jsp:include page="/footer.jsp"></jsp:include>
				</div>
			</div>
		</div>
	</body>
</html>
